﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CoyoEden.Web.Controls;
using CoyoEden;
using CoyoEden.Web.Data;
using CoyoEden.Models;
using System.IO;

public partial class Views_AlbumPics : AlbumViewBase
{
	#region public Properties
	public string CurrentAlbumID { get; set; }
	public string InitPagerStr { get; set; }
	#endregion
	protected void Page_Load(object sender, EventArgs e)
	{
		if (!Page.IsPostBack) {
			Utils.AddJavaScriptInclude(Utils.RelativeWebRoot+"Assets/js/mess/SimplePager.js",Page,true);
			Utils.AddJavaScriptInclude(Utils.RelativeWebRoot + "Assets/js/plugins/jqGalView.js", Page, true);
			Utils.AddJavaScriptInclude(Utils.RelativeWebRoot + "Assets/js/mess/AlbumPicList.js", Page, true);
			Utils.AddStylesheetInclude(Utils.RelativeWebRoot+"Assets/css/jqGalView.css",Page,false);
			CurrentAlbumID=Request.QueryString["id"];
			
			InitPagerString();
			
			if (Page.User.IsInRole("administrators"))
			{
				Utils.AddJavaScriptInclude(Utils.RelativeWebRoot + "admin/assets/js/admin.js", Page, true);
			}
		}
	}
	private void InitPagerString() {
		SimplePager pager = new SimplePager();
		pager.RowPerPage = 40;
		pager.CurrentPage = 1;
		pager.Tip = "";
		pager.RowTotal = 0;
		pager.PageTotal = 0;

		InitPagerStr = Utils.ToStr<SimplePager>(pager);
	}
}
